package com.atgm.mall.gmmailmember.feign;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmailmember.feign.fallback.ProductFeignFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "gm-mall-product", qualifier = "productFeignService", fallback = ProductFeignFallbackService.class)
public interface ProductFeignService {

    /**
     * 获取游戏的简单信息
     * @param id
     * @return
     */
    @GetMapping("/gmmallproduct/goods/simpleInfo/{id}")
    R getGameSimpleInfoById(@PathVariable("id") Long id);

    /**
     * 获取游戏商品的价格
     * @param gameIds
     * @return
     */
    @GetMapping("/gmmallproduct/goods/getGamePrice")
    R getGamePrice(@RequestParam("ids") List<Long> gameIds);

}
